$(document).ready(function()
{
    $('#loader').show();
    $("#treeview").treeview(
    {
        collapsed: true,
        animated: "fast",
        control: "#treeviewcontrol",
        persist: "location"
    });
    $('#loader').hide();
});

function prueba()
{
   $(this).hide();
}